-- GENERATED SPELL FOR [Coilfang Scale-Healer] --


function spell0_21126(pUnit, Event) --@Heal,Heal--
pUnit:FullCastSpellOnTarget(34945,pUnit)
pUnit:RegisterEvent('Sorts_21126', 3500, 1)
end

function spell1_21126(pUnit, Event) --@Heal,Heal--
pUnit:FullCastSpellOnTarget(39378,pUnit)
pUnit:RegisterEvent('Sorts_21126', 3500, 1)
end

function spell2_21126(pUnit, Event) --@Holy Nova,Self--
pUnit:FullCastSpellOnTarget(34944,pUnit)
pUnit:RegisterEvent('Sorts_21126', 625, 1)
end

function spell3_21126(pUnit, Event) --@Holy Nova,Self--
pUnit:FullCastSpellOnTarget(37669,pUnit)
pUnit:RegisterEvent('Sorts_21126', 544, 1)
end

function spell4_21126(pUnit, Event) --@Power Word: Shield,n/a--
pUnit:FullCastSpellOnTarget(17139,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21126', 30330, 1)
end

function spell5_21126(pUnit, Event) --@Power Word: Shield,n/a--
pUnit:FullCastSpellOnTarget(36052,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21126', 30254, 1)
end

function Sorts_21126(pUnit, Event)
local choix_sorts_21126 = math.random(0, 5)
if choix_sorts_21126 == 0 then
pUnit:RegisterEvent('spell0_21126', 1, 1)
end
if choix_sorts_21126 == 1 then
pUnit:RegisterEvent('spell1_21126', 1, 1)
end
if choix_sorts_21126 == 2 then
pUnit:RegisterEvent('spell2_21126', 1, 1)
end
if choix_sorts_21126 == 3 then
pUnit:RegisterEvent('spell3_21126', 1, 1)
end
if choix_sorts_21126 == 4 then
pUnit:RegisterEvent('spell4_21126', 1, 1)
end
if choix_sorts_21126 == 5 then
pUnit:RegisterEvent('spell5_21126', 1, 1)
end
end

function mob21126_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21126', math.random(1500, 3000), 1)
end

function mob21126_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21126_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21126_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21126, 1, 'mob21126_Action')
RegisterUnitEvent(21126, 2, 'mob21126_Leave')
RegisterUnitEvent(21126, 3, 'mob21126_Kill')
RegisterUnitEvent(21126, 4, 'mob21126_Die')
